<script type="text/javascript">
$(function() {
$('#content').xheditor({
    tools: 'full',
    html5Upload: true,
    upMultiple: 4,
    upLinkUrl: '${pageContext.request.contextPath}/bugController/upload.action',
    upLinkExt: 'zip,rar,txt,doc,docx,xls,xlsx',
    upImgUrl: '${pageContext.request.contextPath}/bugController/upload.action',
    upImgExt: 'jpg,jpeg,gif,png'
});
});
</script>
  <form id="goods-edit" method="post" enctype="multipart/form-data">
    <div class="fitem">
      <label>产品标题：</label>
      <input name="title" class="easyui-validatebox" required="true" value="<?php echo $data['title']; ?>"  size="79">
    </div>
    <div class="fitem">
      <p><label>产品图片：</label>
      <input name="picture" type="file" /><input type="hidden" name="picture_data" value="<?php echo $data['picture']; ?>" /></p>
      <p><label> </label><img src="uploads/goods/<?php echo $data['picture']; ?>" width="50" height="50" /></p>
    </div>
    <div class="fitem">
      <label>供应商：</label>
      <script type="text/javascript"> $(".chzn-select").chosen(); $(".chzn-select-deselect").chosen({allow_single_deselect:true}); </script>
      <select data-placeholder="选择供应商..." class="chzn-select" multiple style="width:550px;" name="supplier[]>
        <?php foreach ($suppier_id_name_arr as $key=>$value ):?>
          <option <?php echo in_array($key, $suppier_id_arr)? 'selected="selected"' : '' ?> value="<?php echo $key;?>" ><?php echo $value; ?></option>
        <?php endforeach;?> 
        </select>
     </div>
    <div class="fitem">
      <label>采购价：</label>
      <input name="purchasing_price" value="<?php echo $data['purchasing_price']; ?>">
    </div>
    <div class="fitem">
      <label>零售价：</label>
      <input name="retail_price" class="easyui-validatebox" value="<?php echo $data['retail_price'] ?>">
    </div>
    <div class="fitem">
      <label>库存：</label>
      <input name="stock" class="easyui-validatebox" value="<?php echo $data['stock']; ?>">
    </div>
    <div class="fitem">
      <label>产品描述：</label>
      <textarea id="content" name="content" rows="15" cols="80" style="width: 80%">
      <?php echo $data['content']; ?>
	</textarea>
    </div>
  </form>